<template>
  <div class="settle-in" :class="{ 'footerSettleIn': footerType===2 }">
    <!--头部区域-->
    <!-- <honexun-header>
      <honexun-header-left v-show="showArea === 2"
                           :showLogin="true"></honexun-header-left>
      <honexun-header-right v-show="showArea === 1"></honexun-header-right>
    </honexun-header> -->
    <!--内容区域-->
    <router-view />
    <!--底部区域-->
    <!--<honexun-footer-a v-if="footerType===1" class="footers"></honexun-footer-a>-->
    <honexun-footer-b v-if="footerType===1" :hiddenFooter="true" class="footers"></honexun-footer-b>
    <footer-settle-in v-if="footerType===2"></footer-settle-in>
  </div>
</template>

<script>
// import honexunHeader from '@/layout/header_A';
// import honexunHeaderRight from '@/layout/header_right_A';
// import honexunHeaderLeft from '@/layout/header_left_A';
import honexunFooterA from '@/layout/footer_A';
import honexunFooterB from '@/layout/footer_B';
import footerSettleIn from './components/footer-settleIn';

export default {
  data () {
    return {
      rightPath: [
        '/settleIn/preSettleIn/'
      ],
      footerType: 1
    }
  },
  components: {
    // honexunHeader,
      honexunFooterA,
      honexunFooterB,
    footerSettleIn,
    // honexunHeaderRight,
    // honexunHeaderLeft
  },
  mounted () {
     let path = this.$route.path;
     this.setShowFooter(path);
  },
  methods: {
      setShowFooter(path){
          // if(path.indexOf('preSettleIn') < 0){
          //     this.footerType = 2
          // } else {
          //     this.footerType = 1
          // }
      }
    // setShowArea (path) {
    //   let rightPath = this.rightPath;
    //   let isRight = false;
    //   for (let item of rightPath) {
    //     if (path.indexOf(item) !== -1) {
    //       this.showArea = 1;
    //       isRight = true;
    //     }
    //   }
    //   if (!isRight) this.showArea = 2;
    //   console.log(this.showArea);
    // }
  },
   watch: {
     $route (newVal) {
       this.setShowFooter(newVal.path)
     }
   }
}
</script>

<style lang="less" scoped>
.settle-in {
  position: relative;
  background: #f3f4f8;
  &.footerSettleIn{
    padding-bottom: 100px;
  }
  .honexun-header {
    .mainViewAreaStyle();
    position: absolute;
    z-index: 100;
  }
  .footers {
    background: #2e3550;
  }
}
</style>
